tests: Ensure mutable deployments from libostreetest
authorDan Nicholson <nicholson@endlessm.com>
Fri, 13 May 2016 17:22:02 +0000 (10:22 -0700)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 27 Jun 2016 20:20:21 +0000 (20:20 +0000)
When creating sysroots with libostreetest, we don't get the benefit of
the OSTREE_SYSROOT_DEBUG setting in libtest.sh. That means we'll get
immutable deployments that can't be easily cleaned up.

Ensure the environment variable is set before creating new sysroots. It
would be nice to set the debug flags directly, but that's private API
that isn't currently pulled into libostreetest.

Closes: #372
Approved by: cgwalters

tests/libostreetest.c

index 81f743e9e23d299c2117953e16409fbcd2af0293..d0eb3e813ca0e1c559990562da9286b4bd1910ce 100644 (file)
@@ -94,6 +94,9 @@ ot_test_setup_sysroot (GCancellable *cancellable,
   if (!ot_test_run_libtest ("setup_os_repository \"archive-z2\" \"syslinux\"", error))
     goto out;
 
+  /* Make sure deployments are mutable */
+  g_setenv ("OSTREE_SYSROOT_DEBUG", "mutable-deployments", TRUE);
+
   ret_sysroot = ostree_sysroot_new (sysroot_path);
 
   ret = TRUE;